1. Field of the Invention
The invention relates generally to the field of computer graphics. More particularly, the invention relates to a method and apparatus for representing a graphical object with one or more spatial patches and rendering the graphical object based on this representation.
2. Background Information
In order to provide accurate and immersing computer graphics, it is desirable to use computer graphics models that accurately represent the visual qualities of real-world objects. FIG. 1 illustrates a three-dimensional stage 100 that is at least conceptually used by many computer graphical models to generate computer-generated images. As shown, a spherical object 110 on the stage is viewed from a viewing location 120, which may be an eye or a virtual camera. A light 130 illuminates the object 110.
The viewing location 120 which may be an origin of a world coordinate system may indicate a viewing distance to the object 110, a viewing direction, and one or more viewing angles that may affect what parts of the object 110 are visible. For example, only the side of the object 110 that faces the viewing direction 120 may be visible. A view port 140 and the viewing location 120 may create a viewing frustum 160 that indicates interior objects or portions of objects that are visible. A view plane 150 may contain a projection 155 of the object 110.
Traditionally, three-dimensional objects such as spherical object 110 have been modeled or represented as a combination of a polygonal mesh representation that models the geometry of the three-dimensional object and textures applied to the polygons to represent surface appearances. Both curved and flat surfaces are turned into polygons. This is often known as tessellation. The vertices or corners of the polygons are assigned positions and colors and are used in lighting and shading during rendering. Polygonal representations based on this approach have been preferred because they can provide high frame rates and rapid display of the representations. Most often, triangular meshes have been used because modern hardware has been designed and/or optimized for these representations.
FIG. 2 conceptually illustrates representation of a portion 220 of the surface of a three-dimensional object 210 using a triangular mesh representation. A display 200 shows the three-dimensional object 210 having the portion 220. The portion 220 includes five joined non-overlapping triangles 250, 252, 254, 256, and 258 that form a connected set of triangular planar surfaces that represent the portion 220 of the surface of the object 210. The five triangles share a centralized common vertex. A texture map is applied to each of the five triangles, giving each of the triangles a texture internal area. This textured internal area is represented as textured areas 260, 262, 264, 266, and 268 for triangles 250, 252, 254, 256, and 258, respectively.
As expected, the smoothly varying surface of the spherical object 210 is poorly represented by the triangles (a large number of triangles is needed to represent the object with an acceptable accuracy). This example represents a general and major problem with polygonal mesh representations, namely that polygonal mesh representations provide poor approximations of real-world objects having shapes that vary smoothly, rather than in discrete planes corresponding to the polygonal boundaries. FIG. 3 shows an exemplary human head 300 represented using a prior art triangular mesh representation. Triangle 310, which is clearly visible in the head 300, reveals the inadequacies of this prior art approach for representing real curved objects when realism is desirable.
A technique known as bump mapping is sometimes used to create the appearance of a natural surface or geometric details on a planar area of a polygon. Bump mapping is based on approximating illumination from the surface by perturbing interpolated normals over the polygonal surfaces using stored bump maps. However, no real displacement of pixels is achieved, and bump mapping techniques are not effective for silhouettes and other surfaces that do not directly face the virtual camera. Among other problems with bump mapping, the bump maps require additional storage and self occlusion does not happen correctly.
Accordingly, in the prior art, the only practical way of overcoming the limitation illustrated in FIG. 3 is to provide a large number of very small polygons, which significantly increases the number of computations and slows rendering. Often such sacrifices are not acceptable. Accordingly, in the prior art approaches the need to rapidly display computer graphics has forced an inaccurate and unnatural approach for representing real-world objects, and such approaches are limiting the visual quality and appeal of the computer graphics.